package com.ruoyi.electronicFence.service.Impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.electronicFence.mapper.AlertThresholdMapper;
import com.ruoyi.electronicFence.domain.AlertThreshold;
import com.ruoyi.electronicFence.service.IAlertThresholdService;

/**
 * 报警阈值配置表Service业务层处理
 *
 * @author ygsj
 * @date 2024-04-10
 */
@Service
public class AlertThresholdServiceImpl implements IAlertThresholdService
{
    @Autowired
    private AlertThresholdMapper alertThresholdMapper;

    /**
     * 查询报警阈值配置表
     *
     * @param id 报警阈值配置表主键
     * @return 报警阈值配置表
     */
    @Override
    public AlertThreshold selectAlertThresholdById(Long id)
    {
        return alertThresholdMapper.selectAlertThresholdById(id);
    }

    /**
     * 查询报警阈值配置表列表
     *
     * @param alertThreshold 报警阈值配置表
     * @return 报警阈值配置表
     */
    @Override
    public List<AlertThreshold> selectAlertThresholdList(AlertThreshold alertThreshold)
    {
        return alertThresholdMapper.selectAlertThresholdList(alertThreshold);
    }

    /**
     * 新增报警阈值配置表
     *
     * @param alertThreshold 报警阈值配置表
     * @return 结果
     */
    @Override
    public int insertAlertThreshold(AlertThreshold alertThreshold)
    {
        return alertThresholdMapper.insertAlertThreshold(alertThreshold);
    }

    /**
     * 修改报警阈值配置表
     *
     * @param alertThreshold 报警阈值配置表
     * @return 结果
     */
    @Override
    public int updateAlertThreshold(AlertThreshold alertThreshold)
    {
        return alertThresholdMapper.updateAlertThreshold(alertThreshold);
    }

    /**
     * 批量删除报警阈值配置表
     *
     * @param ids 需要删除的报警阈值配置表主键
     * @return 结果
     */
    @Override
    public int deleteAlertThresholdByIds(Long[] ids)
    {
        return alertThresholdMapper.deleteAlertThresholdByIds(ids);
    }

    /**
     * 删除报警阈值配置表信息
     *
     * @param id 报警阈值配置表主键
     * @return 结果
     */
    @Override
    public int deleteAlertThresholdById(Long id)
    {
        return alertThresholdMapper.deleteAlertThresholdById(id);
    }
}
